#-------------------------------------------------------
from shapes import *
from OtherShapes import *

#---------------------Functions-------------------------
def menu():
	print "What function would you like to run? "
	print "0: Exit\t\t\t6: Sword"
	print "1: Square\t\t7: Circle"  
	print "2: Rectangle\t\t8: Parallelogram"
	print "3: Polygon\t\t9: Move"
	print "4: Arc\t\t\t10: Flower"
	print "5: Pentacle\t\t11: Spiral"
	print "00: Reboot"
	answer = raw_input("Please Choose a Number: ")
	return answer
		
def drawshape(t, option):
	if option == "1":
		size = input("How large would you like your shape to be? ")
		square(t, size)		
	elif option == "2":
		long = input("How long would you like your shape to be? ")
		heigth = input("How tall would you like your shape to be? ")
		rect(t, lenght, height)	
	elif option == "3":
		sides = input("How many sides would you like your shape to have? ")
		size = input("How large would you like your shape to be? ")
		poly(t, sides, size)	
	elif option == "4":
		radius = input("How long would you like the radius of your shape to be? ")
		angle = input("How many degrees would you like your arc to be? ")
		arc(t, radius, angle)
	elif option == "5":
		size = input("How large would you like your shape to be? ")
		pntcl(t, size)	
	elif option == "6":
		size = input("How large would you like your shape to be? ")
		sword(t, size)	
	elif option == "7":
		radius = input("How large would you like your shape to be? ")
		arc(t, radius, angle=360)	
	elif option == "8":
		width = input("How wide would you like your shape to be? ")
		heigth = input("How high would you like your shape to be? ")
		big_angle = input("How large would your largest angle to be? ")
		para(t, width, height, big_angle)
	elif option == "9":
		x = input("What do you want the x coordinate to be? ")
		y = input("What do you want the y coordinate to be? ")
		arc(t, x, y)
	elif option == "10":
		flower(t)		
	elif option == "11":
		spiral(t)	
	else:
		print "Could you please type in a correct input. "
def flower(t):
	print"What shape would you like to flower? "
	print"a: Square"
	print"b: Triangle"
	print"c: Circle"
	print"d: Pentacle"
	option = raw_input("Please type a letter: ")
	if option ==  "a":
		size = input("How large do you want your shape to be? ")
		petals = input("How many petals do you want your shape to have? ")
		sqfl(t, size, petals)
	elif option ==  "b":
		size = input("How large do you want your shape to be? ")
		petals = input("How many petals do you want your shape to have? ")
		trifl(t, size, petals)
	elif option ==  "c":
		size = input("How large do you want your shape to be? ")
		petals = input("How many petals do you want your shape to have? ")
		cirfl(t, size, petals)
	elif option ==  "d":
		size = input("How large do you want your shape to be? ")
		petals = input("How many petals do you want your shape to have? ")
		pntclfl(t, size, petals)
	else:
		print "Could you please type in a correct input. "
def spiral(t):
	print"What function would you like to run? "
	print"a: Square Spiral One"
	print"b: Triangle Spiral"
	print"c: Star Spiral"
	print"d: Pentacle Spiral"
	print"e: Circle Spiral"
	print"f: Square Spiral Two"
	print"g: Super Spiral"
	option = raw_input("Please type a letter: ")
	if option == "a":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		spyrls = input("How many spyrls do you want? ")
		sqspyrl(t, max, inc, spyrls)
	elif option == "b":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		trispyrl(t, max, inc, angle)
	elif option == "c":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		starspyrl(t, max, inc, angle)
	elif option == "d":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		pntclspyrl(t, max, inc, angle)
	elif option == "e":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		cirspyrl(t, max, inc, angle)
	elif option == "f":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		sqspyrl2(t, max, inc, angle)
	elif option == "g":
		max = input("How large do you want your shape to be? ")
		inc = input("How much do you want the spiral to increase? ")
		angle = input("How many spyrls do you want? ")
		suprspyrl(t, max, inc, angle)
	else:
		print"Could you please type in a correct input. "

def run():
	world = TurtleWorld()
	q = Turtle()
	q.delay = 0
	quit = False
	while not quit:
		opt = menu()
		if opt == "0":
			exit()
		elif opt == "00":
			quit = True
			world.clear()
		else:
			drawshape(q, opt)

def runrun():
	while True:
		run()
runrun()